package jvProjects.imageFusion;

import java.applet.Applet;
import java.awt.*;

import jv.object.PsMainFrame;
import jv.viewer.PvViewer;

/**
 */
public class PaFusion extends Applet {
	public		Frame				m_frame			= null;
	protected	PvViewer			m_viewer;
	public void init() {
		m_viewer = new PvViewer(this, m_frame);

		PjFusion myProject = new PjFusion();
		m_viewer.addProject(myProject);
		m_viewer.selectProject(myProject);
		
		setLayout(new GridLayout(1, 0));
		add(m_viewer.getDisplay().getCanvas());
	}
	public static void main(String args[]) {
		PaFusion app	= new PaFusion();
		PsMainFrame frame	= new jv.object.PsMainFrame(app, args);
		frame.pack();
		app.m_frame = frame;
		app.init();
		app.start();
		frame.setSize(900, 600);
		frame.setVisible(true);
	}
	
	/**
	 * Does clean-up when applet is destroyed by the browser.
	 * Here we just close and dispose all our control windows.
	 */
	public void destroy()	{ m_viewer.destroy(); }

	/** Start viewer, e.g. start animation if requested */
	public void start()		{ m_viewer.start(); }

	/** Stop viewer, e.g. stop animation if requested */
	public void stop()		{ m_viewer.stop(); }
}
